package com.atom.plugin.flow

import com.atom.plugin.core.AbstractExtension
import com.google.common.collect.ImmutableList

open class FlowExtension : AbstractExtension() {

    private val flows: MutableList<IFlow> = ArrayList()

    fun addPlugin(i: IFlow) {
        flows.add(i)
    }

    fun getPlugins(): List<IFlow> {
        return ImmutableList.copyOf(flows)
    }

    fun cleanPlugins() {
        flows.clear()
    }

    override fun toString(): String {
        return "(${super.toString()} ,flows=$flows)"
    }
}